import { defineStore } from 'pinia'


export const useContextMenu = defineStore('context-menu', {
  state() {
    return {
      show: false,
      x: 0,
      y: 0
    }
  },
  actions: {
    setPosition(x: number, y: number) {
      this.show = true
      this.x = x
      this.y = y
    },
    hideMenu() {
      this.show = false
      this.x = 0
      this.y = 0
    }
  }
})
